//
//  ActiclePhotoTableViewCell.m
//  MyProject
//
//  Created by dllo on 15/10/30.
//  Copyright © 2015年 蓝鸥科技. All rights reserved.
//

#import "ActiclePhotoTableViewCell.h"
#define WIDTH ([UIScreen mainScreen].bounds.size.width/375)
#define HEIGH ([UIScreen mainScreen].bounds.size.height/667)
@implementation ActiclePhotoTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.bgImage = [[UIImageView alloc]init];
        [self.contentView addSubview:self.bgImage];
        
        self.picImage = [[UIImageView alloc]init];
        self.picImage.image = [UIImage imageNamed:@"iconfont-hulu@2x.png"];
        [self.bgImage addSubview:self.picImage];
        
        self.numLabel = [[UILabel alloc]init];
        self.numLabel.font = [UIFont systemFontOfSize:15 * WIDTH * HEIGH];
        [self addSubview:self.numLabel];
        
        self.avatarImage = [[UIImageView alloc]init];
        self.avatarImage.layer.cornerRadius = 15;
        self.avatarImage.clipsToBounds = YES;
        [self.contentView addSubview:self.avatarImage];
        
        self.screen_nameLabel = [[UILabel alloc]init];
        self.screen_nameLabel.font = [UIFont systemFontOfSize:15 * WIDTH * HEIGH];
        [self.contentView addSubview:self.screen_nameLabel];
        
        self.titleLabel = [[UILabel alloc]init];
        self.titleLabel.numberOfLines = 0;
        [self.titleLabel sizeToFit];
        [self.contentView addSubview:self.titleLabel];
        
        self.desc = [[UILabel alloc]init];
        self.desc.numberOfLines = 0;
        self.desc.font = [UIFont systemFontOfSize:15 * WIDTH * HEIGH];
        [self.desc sizeToFit];
        [self.contentView addSubview:self.desc];
        
        self.typeImage = [[UIImageView alloc]init];
        self.typeImage.image = [UIImage imageNamed:@"iconfont-iconfontlingxing@2x.png"];
        [self.contentView addSubview:self.typeImage];
        
        self.typeLabel = [[UILabel alloc]init];
        self.typeLabel.font = [UIFont systemFontOfSize:12 * WIDTH * HEIGH];
        self.typeLabel.textColor = [UIColor whiteColor];
        [self.contentView addSubview:self.typeLabel];
        
    }
    return self;
}
- (void)layoutSubviews{
    [super layoutSubviews];
    self.bgImage.frame = CGRectMake(10 * WIDTH, 10 * HEIGH, self.contentView.bounds.size.width-20 * WIDTH, 210 * HEIGH);
    self.picImage.frame = CGRectMake(280 * WIDTH, 0, 60 * WIDTH, 30 * HEIGH);
    self.numLabel.frame = CGRectMake(315 * WIDTH, 10 * HEIGH, 45 * WIDTH, 30 * HEIGH);
    self.titleLabel.frame = CGRectMake(50 * WIDTH , 220 * HEIGH, self.contentView.bounds.size.width-50 * WIDTH, 40 * HEIGH);
    self.desc.frame = CGRectMake(50 * WIDTH,260 * HEIGH ,self.contentView.bounds.size.width - 60 * WIDTH, 80 * HEIGH);
    self.avatarImage.frame = CGRectMake(50 * WIDTH, 340 * HEIGH, 30 * WIDTH, 30 * HEIGH);
    self.screen_nameLabel.frame = CGRectMake(90 * WIDTH, 345 * HEIGH, 200 * WIDTH, 20 * HEIGH);
    self.typeImage.frame = CGRectMake(10 * WIDTH, 230 * HEIGH, 30 * WIDTH, 30 * HEIGH);
    self.typeLabel.frame = CGRectMake(13 * WIDTH, 230 * HEIGH, 40 * WIDTH, 30 * HEIGH);

    
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
